﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Runtime.Serialization;
namespace DEMO.WCF_API.Contracts
{
    [ServiceContract]
    interface IEXFaultContract
    {
        [OperationContract]
        EXMessageContract getEmployees(EXMessageContract oExFaultContractSign);
        [OperationContract]
        ExFaultContractResult getEmployeesC(ExFaultContractSign oExFaultContractSign);
    }
    [DataContract]
    public class CustomException
    {
        [DataMember]
        public int FaultCode { get; set; }
        [DataMember]
        public string cException { get; set; }
        [DataMember]
        public string cExceptionDetail { get; set; }
    }
    [DataContract]
    public class ExFaultContractResult
    {
        [DataMember]
        public Int64 EmployeeID { get; set; }
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string Email { get; set; }
        [DataMember]
        [MessageBodyMember(ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign)]
        public string Password { get; set; }
    }
    [DataContract]
    public class ExFaultContractSign
    {
        [DataMember(IsRequired=true)]
        public Int64 EmployeeID { get; set; }

        [DataMember(IsRequired = true)]
        [System.ComponentModel.DefaultValue("Password@saurav")]
        [MessageBodyMember(ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign)]
        public string Password { get; set; }
    }
}
